package io.gitee.hfl.rocketmq.annotation;

import org.apache.rocketmq.client.apis.consumer.FilterExpressionType;

import java.lang.annotation.*;

/**
 * 订阅关系
 *
 * @author hefulin
 * @date 2022/9/7 11:19
 */
@Documented
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface SubscriptionExpression {

    /**
     * topic
     */
    String topic();

    /**
     * 订阅tag表达式
     */
    String expression();

    /**
     * 匹配模式
     *
     * @return 默认tag模式
     */
    FilterExpressionType filterExpressionType() default FilterExpressionType.TAG;

}
